/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jili.ubert.code;

import com.baidu.bjf.remoting.protobuf.EnumReadable;

/**
 *
 * @author CHengJILI
 */
public enum HedgeFlag  implements EnumReadable {
    TOUJI(0) { public String getCode() {return "0";} public String getName() {return "投机"; }},
    TAOLI(1) { public String getCode() {return "1";} public String getName() {return "套利"; }},
    TAOBAO(2) { public String getCode() {return "2";} public String getName() {return "套保"; }};

    public abstract String getName();
    public abstract String getCode();
    private final int value;
    HedgeFlag(int value) { this.value = value; }
    public static HedgeFlag DeCode(String code){
        switch (code){
            case "2":{return HedgeFlag.TAOBAO;}
            case "1":{return HedgeFlag.TAOLI;}
            default :{return HedgeFlag.TOUJI;}
            
        }
    }
    public int value() { return this.value; }
}
